
//股票咨询
function ajaxGetNewsListgp(pageIndex, pageSize, newsType,id) {
    var total = 0; //总共有多少条数据
    var currentPage = 0; //总共有几页
    var pageindex = 0;     //第几页
    $.ajax({
        type: "post",
        data: { "pageIndex": pageIndex, "pageSize": pageSize, "newsType": newsType },
        url: '/tools/news_ajax.ashx?action=getNewsLists&' + Math.random(),
        dataType: 'JSON',
        success: function (result) {
            if (result.status == 1 || result.status == "1") {

                var rs = eval('(' + result.msg + ')').newslist;

                var resultdiv = "";

                resultdiv += '<div class="title-wrap clearfix">';
                resultdiv += ' <h2 style="display:inline-block;">股票配资新闻</h2>';
                resultdiv += ' <a href="/news/newsList.html?type=34">更多<i>&gt;&gt;</i></a>';
                resultdiv += ' </div>';
                resultdiv += '<div class="itemlist-wrap clearfix">';
                for (var i = 0; i < rs.length; i++) {
                    var _time = "";
                    if (rs[i].add_time != null || rs[i].add_time != "") {
                        //new Date().Format("yyyy-MM-dd");
                        _time = new Date(rs[i].add_time).Format("yyyy-MM-dd");

                    }

 
                    if (i == 0) {
                       
                        resultdiv += '<a href="/news/newsDetail.html?id=' + rs[i].id + '" class="item">';
                        resultdiv += ' <div style="display:block" class="detail">';
                        resultdiv += ' <img src="' + rs[i].img_url + '">';
                        resultdiv += ' <div class="content-wrap-news">';
                        resultdiv += ' <div class="title">' + rs[i].title + '</div>';
                        resultdiv += '  <div class="content">' + rs[i].zhaiyao + '</div>';
                        resultdiv += '</div>';
                        resultdiv += '</div>';
                        resultdiv += '</a>';
                    } else {
                        resultdiv += '<div class="item"><div class="summary"><a href="/news/newsDetail.html?id=' + rs[i].id + '">' + rs[i].title + '</a><span>' + _time + '</span></div></div>';
                    }
                  
                }
                resultdiv += ' </div>';
                $("#" + id).html(resultdiv);
            } else {

            

            }
        }
    });
}

//彩票咨询
function ajaxGetNewsListpz(pageIndex, pageSize, newsType, id) {
    var total = 0; //总共有多少条数据
    var currentPage = 0; //总共有几页
    var pageindex = 0;     //第几页
    $.ajax({
        type: "post",
        data: { "pageIndex": pageIndex, "pageSize": pageSize, "newsType": newsType },
        url: '/tools/news_ajax.ashx?action=getNewsLists&' + Math.random(),
        dataType: 'JSON',
        success: function (result) {
            if (result.status == 1 || result.status == "1") {

                var rs = eval('(' + result.msg + ')').newslist;

                var resultdiv = "";
                resultdiv += '<div class="title-wrap clearfix">';
                resultdiv += '<h2 style="display:inline-block;">配资常见问题</h2>';
                resultdiv += '<a href="/news/newsList.html?type=33">更多<i>&gt;&gt;</i></a>';
                resultdiv += '</div>';
                resultdiv += '<div class="itemlist-wrap clearfix">';
                for (var i = 0; i < rs.length; i++) {
                    var _time = "";
                    if (rs[i].add_time != null || rs[i].add_time != "") {
                        //new Date().Format("yyyy-MM-dd");
                        _time = new Date(rs[i].add_time).Format("yyyy-MM-dd");

                    }
               
       
                    if (i == 0) {
                        resultdiv += '<a href="/news/newsDetail.html?id=' + rs[i].id + '" class="item">';
                        resultdiv += '<div style="display:block" class="detail">';
                        resultdiv += '<img src="' + rs[i].img_url + '">';
                        resultdiv += ' <div class="content-wrap-news">';
                        resultdiv += '<div class="title">' + rs[i].title + '</div>';
                        resultdiv += '<div class="content">' + rs[i].zhaiyao + '</div>';
                        resultdiv += '</div>';
                        resultdiv += '</div>';
                        resultdiv += '</a>';
                    } else {
                        resultdiv += '<div class="item"><div class="summary"><a href="/news/newsDetail.html?id='+rs[i].id+'">' + rs[i].title + '</a><span>'+_time+'</span></div></div>';
                    }
              
                }
                resultdiv += '</div>';
                $("#" + id).html(resultdiv);
            } else {



            }
        }
    });
}